import { service } from '@/service'
const baseUrl='/hbsys-system/organization/admin'

export function getDictByCode(typeCode) {
  return service.request({
    url: '/hbsys-system/sysDict/getManagerChild/' + typeCode,
    method: 'get'
  })
}

//保存基础信息
export function stSaveBase(data) {
  return service.request({
    url: '/hbsys-system/association/base',
    method: 'post',
    data: data
  })
}

//根据页码获取当前表格信息
export function getTableInfoByPage(pageIndex) {
  let param = {
    "creditCode":localStorage.getItem("creditCode"),
    "examineYear": localStorage.getItem("examineYear"),
    "organizationBaseId": '1',
    "pageNumberMark": pageIndex
  };
  //JSON.parse(JSON.stringify(data).replace(/null/g, '""'))
  return service.request({
    url: '/hbsys-system/association/query/singleton',
    method: 'post',
    data: param
  })
}

//保存从业人员
export function stSavePractitioners(data) {
  return service.request({
    url: '/hbsys-system/association/practitioners',
    method: 'post',
    data: data
  })
}

//新增负责人信息
export function stSaveResponsible(data) {
  return service.request({
    url: '/hbsys-system/association/responsible',
    method: 'post',
    data: data
  })
}

//新增理事会，监事会成员
export function stSaveSupervisory(data) {
  return service.request({
    url: '/hbsys-system/association/supervisory',
    method: 'post',
    data: data
  })
}
///
//新增机构设置情况-分支机构，代理机构
export function stSaveMechanism(data) {
  return service.request({
    url: 'hbsys-system/association/mechanism',
    method: 'post',
    data: data
  })
}

//新增办事机构，内设机构情况
export function stSaveMechanismWork(data) {
  return service.request({
    url: '/hbsys-system/association/mechanism/work',
    method: 'post',
    data: data
  })
}

//新增实体机构，内设机构情况
export function stSaveMechanismEntity(data) {
  return service.request({
    url: '/hbsys-system/association/mechanism/entity',
    method: 'post',
    data: data
  })
}

//新增年度登记，备案变更，内部建设情况
export function stSaveYearly(data) {
  return service.request({
    url: '/hbsys-system/association/yearly/register ',
    method: 'post',
    data: data
  })
}

//新增年度会议及换届情况，内部建设情况
export function stSaveMeeting(data) {
  return service.request({
    url: '/hbsys-system/association/yearly/meeting',
    method: 'post',
    data: data
  })
}

//内部制度建设情况，内部建设情况，内部管理情况
export function stSaveRegulatory(data) {
  return service.request({
    url: '/hbsys-system/association/regulatory',
    method: 'post',
    data: data
  })
}


//增加接受监督整改情况
export function stSaveSupervision(data) {
  return service.request({
    url: '/hbsys-system/association/supervision',
    method: 'post',
    data: data
  })
}

//新增举办公益慈善活动情况，本年度在本行政区域内开展公益活动情况
export function stSaveWelfare(data) {
  return service.request({
    url: '/hbsys-system/association/welfare',
    method: 'post',
    data: data
  })
}

//承接政府委托职能、购买服务项目、政府补贴情况,行政机关委托的事项
export function stSaveEntrust(data) {
  return service.request({
    url: '/hbsys-system/association/entrust',
    method: 'post',
    data: data
  })
}
//承接政府委托职能、购买服务项目、政府补贴情况,行政机关委托的事项
export function stSaveEntrusted(data) {
  return service.request({
    url: '/hbsys-system/association/entrusted',
    method: 'post',
    data: data
  })
}
//参加国际会议和出访情况
export function stSaveExchange(data) {
  return service.request({
    url: '/hbsys-system/association/exchange',
    method: 'post',
    data: data
  })
}

//在境外设立机构情况
export function stSaveOversea(data) {
  return service.request({
    url: '/hbsys-system/association/oversea',
    method: 'post',
    data: data
  })
}

//对外交流合作项目(含分支、代表机构开展的合作项目)
export function stSaveForeign(data) {
  return service.request({
    url: '/hbsys-system/association/foreign',
    method: 'post',
    data: data
  })
}

//参加国际组织（含分支、代表机构参加的境外组织）
export function stSaveInternational(data) {
  return service.request({
    url: '/hbsys-system/association/international',
    method: 'post',
    data: data
  })
}


//举办刊物及公益活动情况
export function stSavePublication(data) {
  return service.request({
    url: '/hbsys-system/association/publication',
    method: 'post',
    data: data
  })
}

//举办研讨会、论坛活动情况
export function stSaveWorkshop(data) {
  return service.request({
    url: '/hbsys-system/association/workshop',
    method: 'post',
    data: data
  })
}

//举办评比达标表彰活动情况
export function stSaveEvaluation(data) {
  return service.request({
    url: '/hbsys-system/association/evaluation',
    method: 'post',
    data: data
  })
}

//新增培训、认证、鉴定、职称、评审
export function stSaveCommendation(data) {
  return service.request({
    url: '/hbsys-system/association/commendation',
    method: 'post',
    data: data
  })
}

//新增博览会，交易会，展览会
export function stSaveExposition(data) {
  return service.request({
    url: '/hbsys-system/association/exposition',
    method: 'post',
    data: data
  })
}
//支援和计划支援西藏昌都建设、参与和计划乡村振兴工作情况、参与和计划成渝地区双城经济圈建设情况
export function stSaveActivities(data) {
  return service.request({
    url: '/hbsys-system/association/other/activities',
    method: 'post',
    data: data
  })
}

//对外活动主要成绩、问题和管理政策建议
//五、年度工作报告
export function stSaveSummary(data) {
  return service.request({
    url: '/hbsys-system/association/summary',
    method: 'post',
    data: data
  })
}

//六、年检审核意见
export function stSaveApproval(data) {
  return service.request({
    url: '/hbsys-system/association/approval',
    method: 'post',
    data: data
  })
}
//（一）资产负债表
export function stSaveAssets(data) {
  return service.request({
    url: '/hbsys-system/association/assets',
    method: 'post',
    data: data
  })
}

//（二）业务活动表
export function stSaveBusiness(data) {
  return service.request({
    url: '/hbsys-system/association/business',
    method: 'post',
    data: data
  })
}

//（三）现金流量表
export function stSaveCash(data) {
  return service.request({
    url: '/hbsys-system/association/cash',
    method: 'post',
    data: data
  })
}

//接受捐赠资助情况和使用情况
export function stSaveDonation(data) {
  return service.request({
    url: '/hbsys-system/association/donation',
    method: 'post',
    data: data
  })
}

//公益慈善活动支出
export function stSaveExpenditure(data) {
  return service.request({
    url: '/hbsys-system/association/expenditure',
    method: 'post',
    data: data
  })
}

//新建党建工作情况
export function stSaveDjParty(data) {
  return service.request({
    url: '/hbsys-system/association/party',
    method: 'post',
    data: data
  })
}

//九、上年度整改情况表
export function stSaveRectification(data) {
  return service.request({
    url: '/hbsys-system/association/rectification',
    method: 'post',
    data: data
  })
}

//新增附件，上传文件
export function stSaveFile(data) {
  return service.request({
    url: '/hbsys-system/association/annex',
    method: 'post',
    data: data
  })
}

//年检结果
export function stResult(data) {
  return service.request({
    url: '/hbsys-system/association/query/result',
    method: 'post',
    data: data
  })
}

export function getListAuthority() {
  return service.request({
    url: '/hbsys-system/dept/list',
    method: 'get'
  })
}

//新增相关收支，职能和本年度举办重大业务活动情况
export function stIncome(data) {
  return service.request({
    url: '/hbsys-system/association/income',
    method: 'post',
    data: data
  })
}

//职能法律法规
export function stSaveTransferred(data) {
  return service.request({
    url: '/hbsys-system/association/transferred',
    method: 'post',
    data: data
  })
}
//新增其他情况说明
export function stSaveSummaryOther(data) {
  return service.request({
    url: '/hbsys-system/association/summary/other',
    method: 'post',
    data: data
  })
}

// //机关委托授权的事项
// export function stSaveEntrusted(data) {
//   return service.request({
//     url: '/hbsys-system/association/entrusted',
//     method: 'post',
//     data: data
//   })
// }
